package com.kemai.designmode.observer

/**

 *@description:观察者集合
 * @author: zhaoshanshan
 * @date: 2022/10/4 10:32 上午

 */
abstract  class Attentions {

    //关注客户列表
     var observers: MutableList<Observer> = ArrayList<Observer>()

    //添加关注顾客
    open fun add(observer: Observer) {
        observers.add(observer)
    }

    //取消关注
    open fun remove(observer: Observer) {
        observers.remove(observer)
    }

    //发通知
    abstract fun notifyObservers()

}